package com.zxn.dragdemo.adapter;

import com.chad.library.adapter.base.BaseItemDraggableAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.zxn.dragdemo.R;
import com.zxn.dragdemo.bean.CategoryInfo;

import java.util.List;

/**
 * Created by zxn on 2019/9/4.
 */
public class CategorySettingAdapter extends BaseItemDraggableAdapter<CategoryInfo, BaseViewHolder> {

    /**
     * 是否可以排序.
     */
//    private boolean isSort;
    public CategorySettingAdapter(List<CategoryInfo> data) {
        super(R.layout.item_category_setting, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, CategoryInfo item) {
        helper.setText(R.id.tv_category_name, item.categoryName);
//        helper.addOnClickListener(R.id.iv_delete);
//        helper.addOnClickListener(R.id.iv_edit);
//
//
//        helper.setVisible(R.id.iv_delete,!isItemDraggable());
//        helper.setVisible(R.id.iv_edit,!isItemDraggable());
//        helper.setVisible(R.id.iv_drag,isItemDraggable());
    }


//    public void setSort(boolean sort) {
//        isSort = sort;
//    }
}
